#!/usr/bin/env bash

source scripts/_var.sh
source scripts/_fn.sh

mkdir -p "$REPO_DIR/$PROC.cli"

while read -r BIN
do
  trace_on
    go build -o "$REPO_DIR/$PROC.$BIN.$HASH.bin" -tags "$TAGS" "${OPTS[@]}" "./cmd/$BIN/main.go"
  trace_off
done < <(list_cli)

touch "$REPO_DIR/$PROC.cli/.$HASH.wasbuilt"
